package com.scpcfe.www.controller;

import com.scpcfe.www.bean.Person;
import com.scpcfe.www.entity.StudentInfoEntity;
import com.scpcfe.www.service.StudentInfoService;
import org.springframework.stereotype.Controller;
import org.springframework.web.bind.annotation.GetMapping;
import org.springframework.web.bind.annotation.ResponseBody;

import java.util.List;

@Controller    //Controller(视图、html)和RestController(对应json/xml)的区别
public class JsonDemoOne {

    @GetMapping("/json_v1")
    @ResponseBody
    public List<StudentInfoEntity> enter(String stuId) {
        return StudentInfoService.studentInfoService.getStudentInfo(stuId);

    }
}


